//package com.example.webflux_test.websocket;
//
//import org.jetbrains.annotations.NotNull;
//import org.springframework.stereotype.Component;
//import org.springframework.web.reactive.socket.WebSocketHandler;
//import org.springframework.web.reactive.socket.WebSocketSession;
//import reactor.core.CoreSubscriber;
//import reactor.core.publisher.Mono;
//
//import java.time.Duration;
//import java.util.List;
//
//@Component
//public class BarWebSocketHandler implements WebSocketHandler{
//
//
//    /**
//     * Handle the WebSocket session.
//     *
//     * @param session the session to handle
//     * @return completion {@code Mono<Void>} to indicate the outcome of the
//     * WebSocket session handling.443
//     */
//    @Override
//    public Mono<Void> handle( WebSocketSession session) {
//
//        return session.send(
//                session.receive()
//                        .map(msg -> session.textMessage("ECHO -> " + msg.getPayloadAsText()))
//
//        );
//    }
//
//
//}
